Private Declare Function mciGetErrorString Lib "winmm.dll" Alias "mciGetErrorStringA" (ByVal dwError As Long, ByVal lpstrBuffer As String, ByVal uLength As Long) As Long
Private Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal lpstrCommand As String, ByVal lpstrReturnString As String, ByVal uReturnLength As Long, ByVal hwndCallback As Long) As Long
Public CdTrayOpen As Boolean
Function OpenCDTray()
mciSendString "set cd door open", 0, 0, 0
End Function
Function CloseCDTray()
mciSendString "set cd door closed", 0, 0, 0
End Function
Function UnloadAll()
mciSendString "close all", 0, 0, 0
End Function
Function SetCDReady()
mciSendString "open cdaudio alias cd wait shareable", 0, 0, 0
End Function
Function SetFormat()
mciSendString "set cd time format tmsf wait", 0, 0, 0